<!--
 * @Author: liushengyan
 * @Date: 2022-06-08 13:58:30
 * @LastEditTime: 2022-06-09 15:09:22
 * @LastEditors: liushengyan
 * @Descripttion: 
-->
<template>
  <component :is="iconComponent" />
</template>
<script setup>
import icons from "./index";
const props = defineProps({
  iconName: {
    type: String,
    default: "",
  },
});
const iconComponent = ref(null);

onBeforeMount(() => {
  let str = props.iconName.substring(2);
  icons.map((item) => {
    if (item.name == str) {
      iconComponent.value = item;
    }
  });
});
</script>
